//
   Created by Administrator on 2015/11/30.
extends ../public/pure-layout
block container
   .menu-content.comWidth.clearfix
      .inner-menu
         .menu-desc
            -if(isMyMenu)
               .del-panel(style="display:block")
                  a(href="/menu/deleteMenu/#{menu.id}").del 删除
                  a(href="/menu/edit/#{menu.id}").edit 编辑
            h2 #{menu.name}
            .sc-num: p #{menu.collectionCount} 收藏
            .menu-desc
               p #{menu.description}
               .sc-bar
                  .user-left.clearfix
                     a(href="/user/#{user.nick}").clearfix
                        img(src="#{user.portrait}")
                        h3 #{user.nick}
                  .sc-right.clearfix
                     .zan#zan
                        p #{menu.upvote}

                        -if(isUpvoted)
                            a(href="javascript:;"): img(src="/images/hadlike.gif")#like
                        -if(!isUpvoted)
                            a(href="/menu/like/#{menu.id}" title="点赞"): img(src="/images/like.gif")#like
                     .sc-btn#sc-btn
                        -if(isCollected)
                           a(href="/menu/cancelCollect/#{menu.id}") 已收藏
                        -if(!isCollected)
                           a(href="/menu/collect/#{menu.id}") 收藏
                .create-time
                   p 创建时间：#{dateformat(menu.createOn)}
         .all-recipe.clearfix
           .recipe-num
              h2
                 em  #{recipes.length}
                 |菜谱
           ul.recipe-show.clearfix
              -for(var key in recipes)
                 li
                    img(src="#{recipes[key].finishedProductImage}")
                    .inner-msg
                       a(href="/recipe/details/#{recipes[key].rid}") #{recipes[key].title}
                       .keyword 关键字：#{recipes[key].keyword}
                       .col-count
                           em #{recipes[key].collect}
                           |收藏
                       .creator #{recipes[key].nick}
                       -if(isMyMenu)
                          #recipe-del
                              a(href="/menu/#{menu.id}/deleteRecipe/#{recipes[key].rid}") 删除
      .side-bar
         .pop-title.clearfix
            h2 最近流行菜单
            a(href="/menu/top101/page/1") 厨房101
         .pop-lists
            ul.pop-item
               -for(var key in menus)
                  li: a(href="/menu/detail/#{menus[key].m_id}") #{menus[key].name}


   script(src="/js/menuDetail.js")